<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>

<script src="<%=request.getContextPath()%>/js/displaytag.js" type="text/javascript"></script>
  <!--SECCION DE MENSAJES DE ERROR INFORMACION PRECAUCION Y CONFIRMACION -->
  <!--MENSAJES DE INFORMACION  -->

<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 
<table width="99%"  border="0" cellpadding="0" cellspacing="0" widtd="100%">
  <!--TITULO DE LA CONSULTA -->
  <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco"><strong> GRUPO DE USUARIOS <bean:write name="userGroupSelected" property="name" /></strong></td>
  </tr>
  
  <!--BOTON DE CREAR NUEVO REGISTRO  -->
  <tr align="left"> 
    <td height="25" colspan="12" class="titulosenblanco">
      <table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="right">
            <html:link page="/admin/listUserGroupOption.do">
              <img src="<%= request.getContextPath() + "/images/b_nuevo.gif" %>" alt="Nuevo" width="22" height="22" border="0">
              <br>
              <span class="celdaayd">Asociar Opcion a Grupo de Usuarios</span>
            </html:link>
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>  
      </table>
    </td>		
  </tr>

  
  <!--CAMPOS DEL FORMULARIO PARA CONSULTA  -->
  
  <html:form action="/admin/findUserGroupOptions.do">   
   <input type="hidden" name="search" value="search" />
   <input type="hidden" name="code" value='<bean:write name="userGroupSelected" property="code" />'/>
   <input type="hidden" name="asociate" value="s" />
  <tr align="left">
    <td width="100%" align="center"> <table width="70%" border="0" cellpadding="3" cellspacing="3">
  <!--CAMPO 1  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="center" colspan="2" class="celdatabla"><strong> Criterios de busqueda</strong>
            &nbsp;&nbsp;</td>
          
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 2  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Opcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="optionName" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>



    <!--CAMPO 7 -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Descripcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="description" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--BOTON DE SUBMIT  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%"><input type="submit" name="Submit" value="Buscar"> </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%">&nbsp;</td>
          <td width="10%">&nbsp;</td>
        </tr>
      </table>
	</td>
  </tr>
</html:form> 	
  

  <tr> 
    <td colspan="12" align="left">
      
  <!--LISTADO EN CASO DE OBTENER REGISTROS  -->
      <logic:present name="userGroupOptionList"> 
      <%int index = 1;
        String style = "add";%>
  <!--ESPECIFICACION DE TABLA DEL LISTADO: PROGRAMAS  -->
        <display:table name="requestScope.userGroupOptionList"  id="userGroupOptions" class="bordesTable" cellpadding="3" cellspacing="1" style="width:100%">
  <!--CAMPO: NUMERO (CONSECUTIVO)  -->
          <display:column  headerClass="headerTable" class="Numero" title="No." >
              <div align="center"><%=index%></div>
          </display:column>	

   <!--COLUMNA: OPCION   -->
          <display:column headerClass="headerTable" title="Opcion" class="Numero" >
            <bean:write name="userGroupOptions" property="optionName" /> 
          </display:column>	
    
        
			<%=index++%>


        </display:table>
      </logic:present>
		</td>
  </tr></table>
  <DIV align="center">
    <br/>
    <html:link page="/admin/findUserGroup.do">
      <img src="<%= request.getContextPath() + "/images/b_atras.gif" %>" width="24" height="15" border="0"/>
      <br/>
      <span class="celdaayd">Atras</span>
    </html:link>
    <br/>
  </DIV>

